﻿using UnityEngine;
using System.Collections;
using OhioState.Tiling;

public class GameObjTiling : ITiling2D<GameObject>
{
    public int NumTilesX { get; set; }
    public int NumTilesZ { get; set; }
    public int NumberOfTiles { get { return NumTilesX * NumTilesZ; } }
    public GameObjTile[,] Tiling;

    public GameObjTiling(int dimX, int dimZ)
    {
        NumTilesX = dimX;
        NumTilesZ = dimZ;
        Tiling = new GameObjTile[dimX, dimZ];
    }

    public ITile<GameObject> GetTile(TileIndex2D index)
    {
        return Tiling[index.X, index.Z];
    }

    public void SetTile(TileIndex2D index, GameObjTile tile)
    {
        Tiling[index.X, index.Z] = tile;
    }
}